<!-- 绩效-基础设置 -->
<template>
  <ContentCard>
    <template #header>
      <pageHeaderNew :title="title" :breadCrumb="breadCrumb"></pageHeaderNew>
    </template>
    <a-tabs lazy-load v-model:active-key="tabsValue">
      <a-tab-pane key="1" title="指标库">
        <div class="base-setting-warp">
          <div v-for="(item, index) in setting[0]" :key="index">
            <settingWrap
              @goDetail="goDetail(item)"
              :name="item.name"
              :description="item.description"
              :icon="item.icon"
            ></settingWrap>
          </div>
        </div>
      </a-tab-pane>
      <a-tab-pane key="2" title="考核模板库">
        <div class="base-setting-warp">
          <div v-for="(item, index) in setting[1]" :key="index">
            <settingWrap
              @goDetail="goDetail(item)"
              :name="item.name"
              :description="item.description"
              :icon="item.icon"
            ></settingWrap>
          </div>
        </div>
      </a-tab-pane>
      <a-tab-pane key="3" title="考核团队">
        <div class="base-setting-warp">
          <div v-for="(item, index) in setting[2]" :key="index">
            <settingWrap
              @goDetail="goDetail(item)"
              :name="item.name"
              :description="item.description"
              :icon="item.icon"
            ></settingWrap>
          </div>
        </div>
      </a-tab-pane>
      <a-tab-pane key="4" title="考核设置">
        <div class="base-setting-warp">
          <div v-for="(item, index) in setting[3]" :key="index">
            <settingWrap
              @goDetail="goDetail(item)"
              :name="item.name"
              :description="item.description"
              :icon="item.icon"
            ></settingWrap>
          </div>
        </div>
      </a-tab-pane>
    </a-tabs>
  </ContentCard>
</template>

<script lang="ts" setup>
import useExamineTabsStore from '@/store/modules/base/examineTabs/index';

const examineTabsStore = useExamineTabsStore();
interface str {
  name: string;
  description: string;
  icon: string;
  path: string;
}
const tabsValue = computed({
  get: () => examineTabsStore.tabsValue['performance'],
  set: (val: string) => {
    examineTabsStore.setTabs('performance', val);
  }
});
const router = useRouter();
const title = '基础设置';

const breadCrumb: string[] = ['人事', '基础设置'];

const setting = reactive<str[][]>([
  [
    {
      name: '关键业绩指标库',
      description: `说明：关键业绩指标（KPI）库帮助各级管理人员和团队实时监控和评估业绩，以便做出有针对性的决策和改进。`,
      icon: 'icon-settings',
      path: 'KpiIndex'
    },
    {
      name: '能力素质指标库',
      description: `说明：能力素质指标库帮助各级管理人员和个体评估和提升自身的能力素质，以达到个人职业发展和组织目标的要求`,
      icon: 'icon-settings',
      path: 'BpiIndex'
    },
    // {
    //   name: '工作计划指标库',
    //   description: `说明：根据相应的类型配置对应的异动原因`,
    //   icon: 'icon-settings',
    //   path: 'PpiIndex'
    // },
    // {
    //   name: '目标与关键成果指标库',
    //   description: `说明：代码、名称、使命、核心职能、职能详细描述、部门编制、岗位设置、最高管理岗位、地点、联系电话`,
    //   icon: 'icon-settings',
    //   path: 'OkrIndex'
    // },
    {
      name: '加减分项指标库',
      description: `说明：加减分项指标库旨在帮助各级管理人员和个体评估和管理行为表现，以便奖励积极行为并改善不良行为。`,
      icon: 'icon-settings',
      path: 'PlusOrMinusIndex'
    },
    {
      name: '否决指标库',
      description: `说明：否决指标库旨在帮助各级管理人员和团队识别和记录重要的否决标准，以便做出明智的决策和避免不必要的风险。`,
      icon: 'icon-settings',
      path: 'VetoIndex'
    }
  ],
  [
    {
      name: '绩效考核模板',
      description: `说明：自定义配置员工工号的字段，自动生成分配工号`,
      icon: 'icon-settings',
      path: 'PerformanceTemplate'
    },
    {
      name: '试用期考核模板',
      description: `说明：设置员工入职时使用的方案模板，可以引用模板给每个员工配置不同的入职方案`,
      icon: 'icon-settings',
      path: 'ProbationTemplate'
    },
    {
      name: '晋升考核模板',
      description: `说明：设置通知员工入职的模板`,
      icon: 'icon-settings',
      path: 'PromotionTemplate'
    },
    {
      name: '任期考核模板',
      description: `说明：设置员工入职后需要办理手续的模板`,
      icon: 'icon-settings',
      path: 'TenureTemplate'
    },
    {
      name: '合同续签考核模板',
      description: `说明: 配置员工离职类型及相关原因`,
      icon: 'icon-settings',
      path: 'ContractTemplate'
    },
    {
      name: '其他考核模板',
      description: `说明: 配署员工离职面谈记录表`,
      icon: 'icon-settings',
      path: 'OtherTemplate'
    }
  ],
  [
    {
      name: '实习评价模板配置',
      description: `说明：配置实习评价模板`,
      icon: 'icon-settings',
      path: 'InternshipEvaluation'
    },
    {
      name: '实习证明模板设置',
      description: `说明：配置实习证明模板`,
      icon: 'icon-settings',
      path: 'InternshipTemplate'
    },
    {
      name: '实习证明开具方式设置',
      description: `说明：实习期设置`,
      icon: 'icon-settings',
      path: 'InternshipProofMode'
    },
    {
      name: '实习协议模板配置',
      description: `说明：配置实习协议模板`,
      icon: 'icon-settings',
      path: 'IntershipAgreement'
    }
  ],
  [
    {
      name: '绩效等级设置',
      description: `说明：配置绩效考核结果的等级`,
      icon: 'icon-settings',
      path: 'PerformanceLevelSetting'
    },
    {
      name: '转正审批流程设置',
      description: `说明：配置转正审批流程`,
      icon: 'icon-settings',
      path: 'ConfirmExamineSetting'
    },
    {
      name: '面谈记录表',
      description: `说明：配置面谈记录表`,
      icon: 'icon-settings',
      path: 'InterviewRecord'
    }
  ],

  [
    {
      name: '实习评价提醒设置',
      description: `说明：配置实习评价提醒时间`,
      icon: 'icon-settings',
      path: 'InternshipTemplate'
    },
    {
      name: '试用期考核提醒设置',
      description: `说明：配置试用期考核评价提醒`,
      icon: 'icon-settings',
      path: 'InternshipProofMode'
    },
    {
      name: '转正提醒设置',
      description: `说明：配置转正提醒与预警`,
      icon: 'icon-settings',
      path: 'ConfirmRemindSetting'
    },
    {
      name: '合同签订提醒设置',
      description: `说明：配置新员工合同签订提醒`,
      icon: 'icon-settings',
      path: 'ContractRemindSetting'
    },
    {
      name: '考勤异常提醒设置',
      description: `说明：对员工上班、下班未打卡进行相关提醒配置`,
      icon: 'icon-settings',
      path: 'AttendenceRemindSetting'
    },
    {
      name: '考勤与薪资不匹配提醒设置',
      description: `说明：配置员工考勤与薪资不匹配状态提醒设置`,
      icon: 'icon-settings',
      path: 'NoMatchRemindSetting'
    },
    {
      name: '生日提醒设置',
      description: `说明：对员工生日时间进行相关配置，到时间点自动触发提醒给到相关人员`,
      icon: 'icon-settings',
      path: 'BirthdayRemindSetting'
    }
  ]
]);

const goDetail = (item: str) => {
  router.push({
    name: item.path
  });
};
</script>

<style scoped lang="less">
.base-setting {
  &-warp {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
  }
}
.arco-divider-horizontal {
  margin-top: 0;
}

::v-deep .arco-tabs-nav::before {
  height: 0px !important;
}
</style>
